perm filename TEX82.BUG[TEX,DEK]1 blob sn#680525 filedate 1982-10-16 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00003 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	Updates to the TeX82 listing published in September, 1982.
C00005 00003	Changes to TEX.WEB made after Version 0 was released in October, 1982.
C00013 ENDMK
C⊗;
Updates to the TeX82 listing published in September, 1982.
(These changes were included in the original Version 0 of TeX, but they
were discovered after the listing went to press.)

1. Module 943, line 6 (bug discovered 9/28)
change "if cur_cmd=char_num then" to
	if (cur_cmd=letter) ∨ (cur_cmd=other_char) then r←qi(cur_chr)
	else if cur_cmd=char_num then

2. "pause" changed to "pausing" and "pause_code" to "pausing code", throughout.

3. Module 719, lines 8 and 11 (bug discovered 9/28)
insert "rule_save←overfull_rule; overfull_rule←0;" after "save_ptr-2;"
insert "overfull_rule←rule_save;" before "q←p+list_offset;"
and insert a declaration of "overfull_rule: scaled" in module 716.

4. Module 1128, lines 6 and following (bug discovered 9/28)
change "while n≠0 do" to "loop"
change "goto done" to
	begin scan_left_brace; new_save_level(false_group);
	goto done;
	end
change "... return 1130>;" to
		... return 1130>
	else if n=0 then
		begin new_save_level(case_group); goto done;
		end;
and change "done: ... (false_group);" to "done:".

5. Module 182, line 10 (suggestion by DRF on 9/30)
change "0.0" to "?.?"

6. Module 682, new definition of math_spacing (decision of 10/2)
"0234000122*4000133**3**344*0400400*000000234000111*4111112341011"

7. Module 684, new code for case "4" (decision of 10/2)
"4": if cur_style<script_style then x:=thick_mu_skip_code else x:=0;
[Also in module 682 line 7, say "...a conditional thick space (\nonscript..."]

8. Module 11, trie_size changed from 7000 to 8000 because of new
improved (but longer) hyphenation patterns (10/4)

9. Module 453, forgot to change this when 454 changed (noted by DRF 10/6)
format_default_length=20 (not 22)
format_area_length=11 (not 13)
Changes to TEX.WEB made after Version 0 was released in October, 1982.

Since copies of TEX.WEB are not supposed to be edited, there are
two ways to make your version of TeX bug-free:
	1. Get a new copy of TEX.WEB.
	2. Put the corrections into your change file(s).
Some people will find (1) easier than (2), except the main TeX sources at
SCORE won't be updated quite as fast as the sources at SAIL (which have to
be translated into ascii before they are sent to the outside world).
Actually (2) will be quite easy, unless the list of changes becomes quite
long, so it is the recommended procedure. In case (2) it would be useful
to include a comment like "this is fix number xx" (using the numbering
scheme in this file), so that the change could readily be deleted at some
future time.

10. Module 857 line -5 (bug discovered 10/8/92 by HWT)
change it to: if h>0 then decr(h) else h←trie_op_hash_size;

11. Module 457 line 3 (typo discovered 10/9/82)
change `\.!' to `\.\&'

12. Module 1245 line 8 (bug fixed 10/9/82, discovered by MMD)
insert the following between "begin" and "if":
if format_ident≠0 then initialize; {erase preloaded format}

** Version 0.1 incorporates the above changes.

13. This is an extension to the language, put in to satisfy people who
objected to the fact that \write (and \openout and \closeout) only
caused action after being deferred to the next \shipout. Some applications
call for immediate output, hence a new feature: \immediate followed by
\openout or \write or \closeout causes the output action to take place
without delay. For example, \immediate\write{x} is equivalent to
\shipout\vbox{\write{x}} except that the latter also puts an empty
page into the DVI file.

The extension requires the following new code:
13a. Insert `\immediate' after `\closeout' in module 1248.
13b. Define immediate_code=4 and include the following in module 1252:
	primitive("immediate",extension,immediate_code);
13c. Include the following in module 1254:
	immediate_code:print_esc("immediate");
13d. And, in module 1256:
	immediate_code:@<Implement \.{\\immediate}@>;
13e. Finally, there's a new module inserted after old module 1280.
Here is the WEB coding for this module:

@ The presence of `\.{\\immediate}' causes the |do_extension| procedure
to descend to one level of recursion. Nothing happens unless \.{\\immediate}
is followed by `\.{\\openout}', `\.{\\write}', or `\.{\\closeout}'.
@↑recursion@>

@<Implement \.{\\immediate}@>=
begin get_nc_token;
if (cur_cmd=extension)∧(cur_chr≤close_node) then
	begin p←tail; do_extension; {append a whatsit node}
	out_what(tail); {do the action immediately}
	flush_node_list(tail); tail←p; link(p)←null;
	end
else back_input;
end;

** Version 0.2 incorporates the above changes.

14. Like change 11, this one doesn't affect the program, it just improves
the documentation: Insert the following definitions in module 106:
define set_glue_ratio_zero(#) == #:=0.0 {assign representation of zero ratio}
define set_glue_ratio_one(#) == #:=1.0 {assign representation of unit ratio}

These macros are now introduced in a dozen or so future modules, thereby
eliminating most of the system-dependent changes needed elsewhere for ratios.
(Note: I also changed 0 to 0.0 in two places of module 182, where a glue_ratio
comparision was being made.)

15. Change of module 576 (discovered by HWT, 10/14/82)
"hd:quarterword" should be "hd:eight_bits".
(The same error occurs in module 522, but in that module the remedy is
simply to delete the declaration of hd, since this variable is no longer used.)

16. A most embarrassing bug (discovered by DRF, 10/14/82)
Replace module 531 by:

@ A mild optimization of the output is performed by the |dvi_pop|
routine, which issues a |pop| unless it is possible to cancel a
`|push| |pop|' pair. The parameter to |dvi_pop| is the byte address
following the old |push| that matches the new |pop|.

@p procedure dvi_pop(@!l:integer);
begin if (l=dvi_offset+dvi_ptr)and(dvi_ptr>0) then decr(dvi_ptr)
else dvi_out(pop);
end;

Now we need to make a few changes to subsequent modules:
16a. In 549, after "incr(cur_s)", insert
	if cur_s>0 then dvi_out(push);
and before "decr(cur_s)", insert
	if cur_s>0 then dvi_pop(save_loc);

16b. Delete "dvi_out(push);" and "dvi_pop;" from modules 553, 558, 562, 567.

16c. Change module 559 just as in 16a.

17. Module 605, line 6 (discovered 10/15/82)
The test should be "prev_depth>ignore_depth"

** Version 0.3 incorporates the above changes.

18. Module 11 (noticed by WLS, 10/16/82)
Delete the definition of align_size (it's harmless but never used)